package com.wp.service;

import com.wp.mapper.UserMapper;
import com.wp.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class UserServiceImpl implements UserService{

    @Autowired
    private UserMapper userMapper;

    @Override
    public List<User> findAll() {
        return userMapper.findAll();
    }

    @Override
    public User login(String usrName, String usrPassword) {
        return userMapper.login(usrName, usrPassword);
    }

    @Override
    public int deleteUser(Integer usrId) {
        return userMapper.deleteUser(usrId);
    }

    @Override
    public int insert(User user) {
        return userMapper.insert(user);
    }


}
